// Copyright (c) 2023 Presto Labs Pte. Ltd.
// Author: tianqiang

#pragma once

#include "coin2/exchange/base/order/order.h"
#include "coin2/exchange/bittrex/api_order/native_private_client.h"

namespace coin2::exchange::bittrex::api_order {

class BittrexRestAsyncAsioSubscriber : public base::order::RestSubscriber {
 public:
  using RestClient = BittrexNativePrivateClient;
  using RestParams = coin2::exchange::order::BittrexRestParams;

 public:
  using RestSubscriber::RestSubscriber;

  auto rest_client() { return dynamic_cast<RestClient*>(rest_client_); }

  void QueryAccountBalance();
  void QueryOpenOrders();
  void QueryHistoryOrders();
  void QueryFills();
  void GenListenKey(bool is_init);
  void SubscribeAsync() override;
};

}  // namespace coin2::exchange::bittrex::api_order
